from rest_framework.response import Response

from rest_framework.views import APIView

from six_it.models import Enterprise
from xiong_tao169.serializer.enterprise_recruit import EnterpriseSerializer


class HostListView(APIView):
    '''热门企业'''

    queryset = Enterprise.objects.all()
    serializer_class = EnterpriseSerializer

    def get(self, request):
        permissions = Enterprise.objects.all()
        serializer = EnterpriseSerializer(permissions, many=True)
        return Response(serializer.data)
